<? 
     session_start();
?>﻿
<? 
define(title,"ne.cn.ua"); 
include 'bd.php';
if($_SESSION["error"] != '') {$error = true;}
else {$error = false;}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Монитооринг сети | <? echo title; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style/style.css" rel="stylesheet" type="text/css" />
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"> 
<script type="text/javascript" src="js/jq.js"></script>  
<script type="text/javascript" src="js/scripts.js"></script> 
<style>
    body {
        background: url("img/grey.jpg");
    }
    #main_block {
        margin: 50px;
    }
    #form {
        border: 1px solid #777;
        background: #fff;
        width: 400px;
        padding: 10px;
        border-radius: 10px;
    }
    #form input {
        width: 300px;
        padding: 5px;
        border: 1px solid #ccc;
        border-radius: 3px;
    }
    #form p {
        padding: 0px;
        margin: 5px;
    }
    #error {
        border: 1px solid #777;
        background: #fff;
        width: 400px;
        padding: 12px;
        border-radius: 10px;
        color: red;
        display: none;
    }
    
</style>
</head>

<body>
    <div align="center" id="main_block"> 
        <h1>Авторизируйтесь для работы</h1>
        <div id="error" style="display: <? if($error){echo 'block';} ?>">
            <? if($error){echo $_SESSION["error"];} ?>
            
        </div>
        <br>
        <div id="form"> 
            
            <form action="login.php" method="get">
                <p>Ваш логин:</p>
                <p><input type="text" name="login" /></p>
                <p>Ваш пароль:</p>
                <p><input type="password" name="pass" /></p>
                <p><input type="submit" name="sub" value="Вход"></p>
                
            </form>
        </div>
    </div>
    

</body>
</html>
<?
    unset($_SESSION['error']); 
?>